WHAT IS OOFILE? OOFILE exists to make life easy for c++ programmers who want to embed a fast database and particularly those using an application framework, or hooking up to the World Wide Web. OOFILE is a c++ framework. It features replaceable database engines with the current release using Faircom's c-tree Plus ISAM engine. This gives us royalty-free databases portable across Mac, MS Windows and Unix. WHO IS OUR MARKET 1) c++ developers (or wannabees) wanting an embedded database for writing applications, especially those working in combination with an application framework such as zApp, MFC or PowerPlant. 2) World Wide Web developers seeking a database and report-writer combination to create web pages in response to queries, searching hundreds of thousands of records (at least). 3) c-tree users who want to make life a LOT easier (a separate feature sheet is available on request, which lists the benefits OOFILE adds to c-tree). Design Goals - everything is native C++ with no (database) preprocessor required - keep syntax very simple, familiar to 4GL users and not needing c++ gurus - safe syntax that makes it hard to do the wrong thing by mistake, making maximum use of c++ compiler type-checking, built in debugging modes and third-party tools such as SmartHeap - implement with a choice of database engines for the backend (imagine using ODBC to pull corporate data into your fast c-tree-based OOFILE EIS system) - integrate with a range of common application frameworks - provide additional classes for managing gui interfaces to help construct typical database applications, where features are not commonly part of application frameworks - use a widely available level of c++ (no RTTI, templates or exception handling) BASIC PHILOSOPHY Object-oriented design is mainly about classes, not individual objects. OOFILE is similar. Most of the time you model your data in terms of classes. You do NOT declare individual objects (unlike the ODMG model). Consider a database from the user's view. They generally see collections of data and edit or interact with individual records from the collection. The user doesn't care about individual object identity, they don't create symbolic names for particular objects. These things may be important inside the database, but do not need to be exposed. SOME SIMPLE EXAMPLES Note: for more examples, look on http://www.highway1.com.au/adsoftware/oofile.html or ftp://ftp.highway1.com.au/pub/adsoftware/oofile/ DECLARING SIMPLE TABLES This example declares a small persistent class with three fields and two indices for fast searching on the fields. DECLARE_CLASS(dbPeople) dbChar Name, Address; dbLong Salary; dbPeople() : Name(40, "Name", kIndexNoDups), Address(255, "Address"), Salary("Salary", kIndexed) {}; }; Note that the constructors also specify the field name strings. These are optional, but are of great benefit when writing query and report-writer logic or when constructing a database schema that should be readable by others. SOME OTHER FEATURES - Derived fields, either specified as a combination of existing fields or user-calculated (combined fields in v1.2, user-calc due in 1.3) - User-defined relations (due in 1.3) - keyword indexing (due in 1.3) - phonetic indexing (due in 1.3) - inbuilt report-writer RELATIONSHIPS One of the big features of an OODBMS is modelling the relationships between objects. OOFILE allows you to model relationships in a pure OODBMS sense, using object identifiers, or explicitly perform runtime joins over database fields. There are a number of syntaxes available to establish relationships. The following complete program shows a relationship using direct pointers, but OOFILE can also manage relationships with join fields. Joins might be more appropriate when adapting an existing database. DECLARE_REF(dbPatients) DECLARE_SET(dbVisits) DECLARE_CLASS(dbPatients) dbChar LastName, Othernames; dbVisitsSet Visits; dbLong Salary; dbPatients() : LastName(40, "Last Name", kIndexed), Othernames(80, "Other names", kIndexed), Salary("Salary", kIndexed) { Visits.propagateRelatedDeletes(); }; }; DECLARE_CLASS(dbVisits) dbPatientsRef Patient; dbDate VisitDate; dbChar Why; dbVisits() : VisitDate("VisitDate", kIndexed), Why(200, "Reason for Visit", kIndexCompress) {}; }; // declaring the concrete variables dbConnect_ctree theDatabase; dbPatients Patients; dbVisits Visits; dbRelationship(Patients.Visits, Visits.Patient); // small sample program to create a parent and child record and print // the database on the console int main() { theDatabase.newConnection("PROMO.db"); Patients.newRecord(); Patients.LastName = "Dent"; Patients.Visits->newRecord(); Patients.Visits->VisitDate = "12th May"; Patients.Visits->Why = "Flu"; Patients.saveRecord(); cout << theDatabase; return 0; } APPLICATION FRAMEWORKS AND OOFILE GUI Integration classes have been released for PowerPlant (Mac) and are under development for zApp & MFC with more frameworks to follow. A "non-intrusive" approach has been taken of providing helper classes and instructions that let you incorporate OOFILE use into an existing program. These helper classes include subclasses of the native edit fields, that store data directly into the database. Depending on your framework, other classes are added for displaying lists of records, managing multiple page input forms and similar business application functions. For Macintosh users, the popular AppMaker code generator has been enhanced to generate OOFILE applications. You can go from drawing your interface to a complete working database application, without writing code. OOFILE demos are available online and on the CodeWarrior, AppMaker and Apprentice CD's. TEST PLATFORMS in-house c-tree+ v6.4B & 6.5A Mac - CodeWarrior CW8 - Symantec 8.03 MS Windows - Borland c++ v4.5p3 SunOS 4.1.3 - g++ v2.7 Contact Details Australian Distributors Techflow Pty Ltd 5/17 Mooramba Road Dee Why NSW 2099 Phone (02) 9971 4311 Fax (02) 9982 3623 sales@techflow.com.au European Distributors Full Moon Software PO Box 862, MAIDENHEAD, Berks SL6 0QJ UK ph: +44 1628 660242 fax: +44 1628 666084 http://www.u-net.com/~moonweb/ sales@fullmoon.com US Distributors Xplain Corporation, through the MacTech Mail Order Store productinfo@xplain.com http://www.mactech.com OOFILE Technical queries, and other international sales Andy Dent BSc MACS President and OOFILE Product Architect A.D. Software 94 Bermuda Drive Ballajura, Western Australia 6066 Phone/Fax +61-9-249-2719 CompuServe: 100033,3241 Internet: dent@highway1.com.au ftp://ftp.highway1.com.au/pub/adsoftware/ http://www.highway1.com.au/adsoftware/ OOFILE - ̉the cross-platform OODBMS that speaks c++"